package org.millioncall.yueyoga.admin.service;

import java.io.File;
import java.util.List;
import java.util.Map;

import org.millioncall.openplatform.common.PaginatedList;
import org.millioncall.yueyoga.admin.model.AviatorExpression;
import org.millioncall.yueyoga.admin.model.ClassMemberModel;
import org.millioncall.yueyoga.admin.model.Member;
import org.millioncall.yueyoga.admin.model.MemberAdvance;
import org.millioncall.yueyoga.admin.model.MemberModel;

public interface MemberService {

	/**
	 * 查询在店会员
	 * 
	 * @param start
	 * @param limit
	 * @param map
	 * @return
	 */
	public PaginatedList<MemberModel> findFrontPresentMemberList(Integer start,
			Integer limit, Map<String, Object> map);

	/**
	 * 查询离店会员
	 * 
	 * @param start
	 * @param limit
	 * @param map
	 * @return
	 */
	public PaginatedList<MemberModel> findFrontAbsentMemberList(Integer start,
			Integer limit, Map<String, Object> map);

	/**
	 * 查询会员总数
	 * 
	 * @return
	 */
	public int getTotalMembers();

	public List<Member> getAllMembersWithAviator(Map<String, Object> params,
			AviatorExpression expression, Map<String, Object> aviatorParams,
			int limit);

	public Member findById(Map<String, Object> map);

	public PaginatedList<Member> getMemberInPage(int start, int pageSize);

	public List<Member> getMemberAll(Map<String, Object> map);

	public boolean saveMember(Map<String, Object> map);

	public boolean updateMember(Member member);

	public boolean updateMemberHeadImg(Map<String, String> params);

	public void deleteMemberByIds(Integer[] deids);

	public Member findByCardNumber(Map<String, Object> map1);

	public void editMemberEnblue(Integer[] deids, Map<String, Object> map);

	public PaginatedList<Member> getMemberInPage(int start, int pageSize,
			String[] paramNames, String[] paramValues);

	public void editMemberCardNumber(Map<String, Object> map);

	public List<Member> findMemberByProperty(Map<String, Object> map);

	public List<Member> findMemberByCardNumberOrPhone(Object value);

	public PaginatedList<Member> getMemberInPage(int start, int pageSize,
			Map<String, Object> map);

	public int findByMaxId();

	public Member findByPhone(Map<String, Object> map1);

	public List<ClassMemberModel> findAllBasicMemberInfo(Map<String, Object> map);

	public PaginatedList<Member> findMemberByLiftClubId(int start, int limit,
			Map<String, Object> map);

	public String importMemberFromExcel(File source, Map<String, Object> map);

	public List<Member> findAllMember(Map<String, Object> map);

	public PaginatedList<Member> findAllMemberByGroup(Integer start,
			Integer limit, Integer groupId);

	public List<Member> findExpireBirthdayMember();

	public PaginatedList<MemberModel> findFrontMemberList(Integer start,
			Integer limit, Map<String, Object> map);

	public MemberModel findFrontMemberDetailInfo(Map<String, Object> map);

	/**
	 * 查询所有符合aviator表达式的会员
	 * 
	 * @param expression
	 * @param params
	 * @param start
	 * @param limit
	 * @return
	 */
	public List<MemberAdvance> getAllMembersWithAviatorAdvance(
			Map<String, Object> params, AviatorExpression expression,
			Map<String, Object> aviatorParams, int limit);

	public List<ClassMemberModel> findClassMember(Map<String, Object> map);
}
